package cn.sykj.car.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 附件
 * </p>
 *
 * @author yixu
 * @since 2020-07-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = false)
@ApiModel(value="File对象", description="附件")
public class File extends Model<File> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String fileName;

    private Long contactId;

    @ApiModelProperty(value = "如“doc/pdf/jpg”等")
    private String fileType;

    private String fileUrl;

    private String fileKey;

    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "文件所属类型：10-客户订单  20-服务单")
    private String fileCategory;

    private String fileSize;


    public static final String ID = "id";

    public static final String FILE_NAME = "file_name";

    public static final String CONTACT_ID = "contact_id";

    public static final String FILE_TYPE = "file_type";

    public static final String FILE_URL = "file_url";

    public static final String FILE_KEY = "file_key";

    public static final String DEL_FLAG = "del_flag";

    public static final String FILE_CATEGORY = "file_category";

    public static final String FILE_SIZE = "file_size";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
